<?php

class prettymuchamazing_scraper extends BlogScraper
{
    function __construct()
    {
        parent::__construct('prettymuchamazing');
    }

}

class prettymuchamazing_post_scraper extends PostScraper
{
	
	function getTitle()
    {
        $title = $this->xpath->query("//h2[@class='entry-title']//a")->item(0)->nodeValue;
        echo $title;
        return $title;
    }
    
    function getLink()
    {
        return $this->xpath->query("//h2[@class='entry-title']//a")->item(0)->getAttribute('href');
    }
    
    
    function getDate()
    {
        $date_node = $this->xpath->query('//abbr')->item(0)->nodeValue; 

        $date = date('Y-m-d', strtotime($date_node));
        return $date;
             
    }
    
    function prepareTrack($track)
    {
                
        if ($track['name'] == 'download') 
        {
            $track['name'] = basename($track['url']);
        }
    
        return $track;
    }    
}
?>